<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no" />
    <meta name="theme-color" content="#000000" />
    <meta http-equiv="X-Frame-Options" content="sameorigin">
    <title>Soico</title>
    <link rel="stylesheet" href="../../css/main.827f7436.css" />
    <link rel="stylesheet" href="../../css/materialize.min.css" />
    <link rel="stylesheet" href="../../css/App.css"/>
    <link rel="stylesheet" href="../../css/Header.css">
    <link rel="stylesheet" href="../../css/ProjectDetail.css" />
    <script type="text/javascript" async="" src="../../js/common/recaptcha__zh_cn.js"></script>
    <script type="text/javascript" src="../../js/common/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="../../js/common/materialize.min.js"></script>
    <script type="text/javascript" src="../../js/common/main.312bc4ae.js"></script>
    <script type="text/javascript" src="../../js/common/ProjectDetail.js"></script>
    <script type="text/javascript" src="../../js/common/layer.js"></script>
    <script type="text/javascript" src="../../js/common/requestAPi.js"></script>
</head>
<body>
<div id="root">
    <div style="background-color: rgb(250, 250, 250); min-height: 100vh; min-width: 1000px; font-family:Helvetica Neue, Helvetica, Arial, sans-serif;">
        <div>
            <div class="s-alert-wrapper"></div>
            <%@include file="top.jsp"%>
            <div class="container">
                <div>
                    <div class="row">
                        <div class="col s8">
                            <div class="row head">
                                <div class="col s2">
                                    <img src="images/${project.project_name}.png" />
                                </div>
                                <div class="col s10">
                                    <h5>${project.project_name}</h5>
                                    <p class="summary">${project.simple_info}</p>
                                </div>
                            </div>
                            <div style="height: 1px; background-color: black; margin: 10px 30px;"></div>
                            <span>
                                <%--<iframe frameborder="0" allowfullscreen="1" allow="autoplay; encrypted-media" title="Tencent video player" width="100%" height="360" src="${project.video}" id="undefined" class="undefined"></iframe>--%>
                                <iframe frameborder="0" allowfullscreen="1" allow="autoplay; encrypted-media" title="YouTube video player" width="100%" height="360" src="${project.video}" id="widget2"></iframe>
                            </span>
                            <div style="margin-top: 20px;">
                                <p class="projectDetail" >${project.example_info}</p>
                                <h5 style="padding-bottom: 5px; font-size: 1.1em; border-bottom: 1px solid rgb(0, 0, 0); display: inline;">基本介绍</h5>
                                <p class="content">项目介绍:${project.project_basic_info}</p>
                                <h5 style="padding-bottom: 5px; font-size: 1.1em; border-bottom: 1px solid rgb(0, 0, 0); display: inline;">白皮书</h5>
                                <p class="content"><a href="${project.white_book}" target="_blank">${project.white_book}</a></p>
                                <h5 style="padding-bottom: 5px; font-size: 1.1em; border-bottom: 1px solid rgb(0, 0, 0); display: inline;">团队</h5>
                                <p class="content"><a href="${project.team_info}" target="_blank">${project.team_info}</a></p>
                            </div>
                        </div>
                        <div class="col s4">
                            <div class="rateSection">
                                <h4>${project.expert_comment}</h4>
                                <p style="font-size: 0.8em;">​专家综合评分</p>
                            </div>
                            <%--<div class="progress lighten-5">--%>
                                <%--<div class="determinate" style="width: 11%;"></div>--%>
                            <%--</div>--%>
                            <h5 style="font-size: 1em;"> <c:choose>
                                <c:when test="${project.project_status== '1'}">
                                    ${project.simple_info}
                                </c:when>
                                <c:otherwise>
                                    ${project.amount} ETH
                                </c:otherwise>
                            </c:choose></h5>
                            <p style="font-size: 0.8em;">已募集</p>
                            <div class="detailInfo">
                                <h5 style="font-size: 1.2em; padding-bottom: 10px;">ICO数据资料</h5>
                                <div style="height: 1px; background-color: black; margin: 10px 30px;"></div>
                                <p style="font-size: 0.8em;">时程​</p>
                                <p style="font-size: 0.8em;"><fmt:formatDate value="${project.ico_start}" pattern="yyyy-MM-dd"/> - <fmt:formatDate value="${project.ico_end}" pattern="yyyy-MM-dd"/></p>
                                <div class="countDown">
                                    <%--<span>2:17:56:49</span>--%>
                                    <%--<p style="font-size: 0.7em;">Day Hour Min Sec</p>--%>
                                    <div style="height: 1px; background-color: black; margin: 10px 30px;"></div>
                                    <div class="detailTable">
                                        <div class="row" style="font-size: 0.9em;">
                                            <div class="col s5 textleft offset-s1">
                                                代码
                                            </div>
                                            <div class="col s5 textright">
                                                ${project.ico_code}
                                            </div>
                                        </div>
                                        <div class="row" style="font-size: 0.9em;">
                                            <div class="col s5 textleft offset-s1">
                                                发币时间
                                            </div>
                                            <div class="col s5 textright">
                                                <fmt:formatDate value="${project.issue_time}" pattern="yyyy-MM-dd"/>
                                            </div>
                                        </div>
                                        <div class="row" style="font-size: 0.9em;">
                                            <div class="col s5 textleft offset-s1">
                                                参考价格
                                            </div>
                                            <div class="col s5 textright">
                                                ${project.reference_price}
                                            </div>
                                        </div>
                                        <div class="row" style="font-size: 0.9em;">
                                            <div class="col s5 textleft offset-s1">
                                                平台
                                            </div>
                                            <div class="col s5 textright">
                                                ${project.tecnical_platform}
                                            </div>
                                        </div>
                                        <div class="row" style="font-size: 0.9em;">
                                            <div class="col s5 textleft offset-s1">
                                                接受币别
                                            </div>
                                            <div class="col s5 textright">
                                                ${project.coin_type}
                                            </div>
                                        </div>
                                        <div class="row" style="font-size: 0.9em;">
                                            <div class="col s5 textleft offset-s1">
                                                软顶
                                            </div>
                                            <div class="col s5 textright">
                                                ${project.soft_top}
                                            </div>
                                        </div>
                                        <div class="row" style="font-size: 0.9em;">
                                            <div class="col s5 textleft offset-s1">
                                                硬顶
                                            </div>
                                            <div class="col s5 textright">
                                                ${project.hard_top}
                                            </div>
                                        </div>
                                        <div class="buttonSec">
                                            <c:choose>
                                                <c:when test="${project.project_status== '1'}">

                                                </c:when>
                                                <c:otherwise>
                                                    <button id="aaa" class="btn">参与此项目</button>
                                                </c:otherwise>
                                            </c:choose>
                                            <button class="btn"><a href="${project.team_info}" target="_blank">造访网站</a></button>
                                            <section class="skylight-wsectio">
                                                <div class="skylight-overlay" style="position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 99; background-color: rgba(0, 0, 0, 0.3); transition-property: all; transition-timing-function: ease; display: none; transition-duration: 200ms;"></div>
                                                <div class="skylight-dialog" style="width: 50%; height: 400px; position: fixed; top: 50%; left: 50%; margin-top: -200px; margin-left: -25%; background-color: rgb(255, 255, 255); border-radius: 2px; z-index: 100; padding: 15px; box-shadow: rgba(0, 0, 0, 0.14) 0px 0px 4px, rgba(0, 0, 0, 0.28) 0px 4px 8px; transform: scale(0); transition-property: transform; transition-timing-function: ease; transition-duration: 200ms;">
                                                    <a role="button" class="skylight-close-button" href="javascript:;" style="cursor: pointer; position: absolute; font-size: 1.8em; right: 10px; top: 0px;">&times;</a>
                                                    <h2>声明</h2>
                                                    <div class="disclaimer">
                                                        <p style="text-align: justify; margin-left: 15px; margin-right: 15px;">We don’t oversee projects’ performance, and we don’t mediate disputes between users. Soico.co isn’t liable for any damages or losses related to your use of the Services. We don’t become involved in disputes between users, or between users and any third party relating to the use of the Services. We don’t oversee the performance or punctuality of projects, and we don’t endorse any content users submit to the Site. When you use the Services, you release Soico.co from claims, damages, and demands of every kind — known or unknown, suspected or unsuspected, disclosed or undisclosed — arising out of or in any way related to such disputes and the Services. All content you access through the Services is at your own risk. You’re solely responsible for any resulting damage or loss to any party. Soico.co遵守各国政府对ICO进行监管的政策，Soico.co团队将禁止一切禁止ICO的国家居民进行ICO项目。您确认遵守所在国法律法规，您愿承担由此带来的一切法律后果。</p>
                                                        <%--<div class="col">--%>
                                                            <%--<input type="checkbox" name="group1" value="firstCheck" class="" id="input_36" onclick="checkbox()" />--%>
                                                            <%--<label class="active" for="input_36">我确认我不是美国公民、持有美国居留证的居民、美国法人机构(定义为“美国人“)，并且并非为任何美国人代表。</label>--%>
                                                        <%--</div>--%>
                                                        <%--<br />--%>
                                                        <div class="col">
                                                            <input type="checkbox" name="group1" value="secondCheck" class="" id="input_37" onclick="checkbox()" />
                                                            <label class="active" for="input_37">我确认我已经详阅本项目之公开资料并了解本项目。</label>
                                                        </div>
                                                        <br />
                                                        <div class="col">
                                                            <input type="checkbox" name="group1" value="thirdCheck" class="" id="input_38" onclick="checkbox()" />
                                                            <label class="active" for="input_38">我确认我愿意投资本项目，并且愿意承担所有投资风险。</label>
                                                        </div>
                                                        <br />
                                                        <div class="col">
                                                            <input type="checkbox" name="group1" value="fourthCheck" class="" id="input_39" onclick="checkbox()" />
                                                            <label class="active" for="input_39">我已遵守所在国法律法规，我愿承担由此带来的一切法律后果。</label>
                                                        </div>
                                                        <br />
                                                        <div class="col">
                                                            <input type="checkbox" name="group1" value="fifthCheck" class="" id="input_40" onclick="checkbox()" />
                                                            <label class="active" for="input_40">我确认我已经详阅Soico.co的Terms of Use与Privacy。</label>
                                                        </div>
                                                    </div>
                                                    <button disabled="" id="a1" class="btn disabled" >参与此项目</button>
                                                </div>
                                            </section>
                                        </div>
                                        <!--控制显示隐藏-->
                                        <script type="text/javascript">
                                            $("#aaa").click(function () {
                                                var c_start=document.cookie.indexOf("userInfo=");
                                                if (c_start==-1){
                                                    layer.msg('请先登录！');
                                                    window.location.href="signin2Skip";
                                                }else {
                                                    $(".skylight-overlay").css("display","block");
                                                    $(".skylight-dialog").css("transform","scale(1)");
                                                }
                                            });
                                            // 跳转用户详情页
                                            $(".skylight-close-button").on('click',function() {
                                                $(".skylight-dialog").css("transform","scale(0)");
                                                $(".skylight-overlay").css("display","none");
                                                }
                                            );
                                            function checkbox() {
                                                var str = document.getElementsByName("group1");
                                                var objarray = str.length;
                                                var chestr = "";
                                                for (i = 0; i < objarray; i++) {
                                                    if (str[i].checked == true) {
                                                        chestr += str[i].value + ",";
                                                    }
                                                }
                                                if (chestr.length == 46) {
                                                    // console.log(chestr.length);
                                                    $("#a1").removeAttr("disabled");
                                                    $("#a1").removeClass("disabled");
                                                    $("#a1").attr("onclick","goWebsite();");
                                                }
                                                else {
                                                    $("#a1").attr("disabled","");
                                                }
                                            }
                                            function goWebsite() {

                                                var cookieArr = document.cookie.split('; ');
                                                var userInfo=null;
                                                for(var i = 0; i < cookieArr.length; i++) {
                                                    var arr = cookieArr[i].split('=');
                                                    if(arr[0] === 'userInfo') {
                                                        userInfo= arr[1];
                                                    }
                                                }
                                                if (userInfo==null){
                                                    window.location.href="signin2Skip";
                                                }else {
                                                    window.location.href="placeorderSkip?pk=${user}&time=${time}&auth=${auth}&pid=${project.pk}&pname=${project.project_name}";
                                                }
                                            }
                                        </script>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <footer class="page-footer">
                <%@include file="footer.jsp"%>
            </footer>
        </div>
    </div>
</div>
</body>
</html>